package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import com.example.demo.services.SysUserService;

@Controller
public class SysUserController {
/*
 * 和前端页面数据绑定
 */
	@Autowired
	private SysUserService sysUserService;

	@RequestMapping("/sys_user")
	public String sys_user(Model model) {
		model.addAttribute("sysUser", sysUserService.findALL());
		return "sys_user_select";
	}

	@RequestMapping("/sys_user_select")
	public String sys_user_select(String user_id, Model model) {
		model.addAttribute("sysUser", sysUserService.select_id(user_id));
		return "sys_user_select";
	}
}
